#include "Effect_DisplayDamage.h"


Effect_DisplayDamage::Effect_DisplayDamage(XnPoint3D point, float damage) : Effect(point, Math::Vector3D(), false, false), _damage(damage)
{
}


Effect_DisplayDamage::~Effect_DisplayDamage(void)
{
}

bool Effect_DisplayDamage::drawEffectInternal() {
  char value[5];
  sprintf(value, "%d", (int)floor(_damage));
  
  glTranslatef(this->start_P.X, this->start_P.Y + getFrame() * 20, this->start_P.Z);
  if (getFrame() == 0) {
    glColor3d(0.0,0.0,0.0);
  }
  else {
    glColor3d(1.0, 1.0, 1.0);
  }
  Render_String(value);

  return getFrame() > 20;
}